const userStore = {
    namespaced: true,
    state: {
      userInfo: {}
    },
    getters: {
      userInfo: (state) => state.userInfo,
      isLogin: (state) => state.userInfo.id!== undefined
    },
    mutations: {
      setUserInfo (state, payload) {
        state.userInfo = payload
      }
    },
    actions: {
      setUserInfo ({ commit }, payload ) {
        commit('setUserInfo', payload)
      }
    }
  }
  
  export {
    userStore
  }
  